package com.caotv.wkreport.dao;

// Generated 2013/05/02 13:09:40 by Hibernate Tools 4.0.0

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Bookingroom generated by hbm2java
 */
@Entity
@Table(name = "bookingroom", catalog = "example")
public class Bookingroom implements java.io.Serializable {

	private Integer bookId;
	private Rooms rooms;
	private User user;
	private Date startTime;
	private Date endTime;
	private String description;
	private boolean status;

	public Bookingroom() {
	}

	public Bookingroom(Rooms rooms, User user, Date startTime, Date endTime,
			boolean status) {
		this.rooms = rooms;
		this.user = user;
		this.startTime = startTime;
		this.endTime = endTime;
		this.status = status;
	}

	public Bookingroom(Rooms rooms, User user, Date startTime, Date endTime,
			String description, boolean status) {
		this.rooms = rooms;
		this.user = user;
		this.startTime = startTime;
		this.endTime = endTime;
		this.description = description;
		this.status = status;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "bookId", unique = true, nullable = false)
	public Integer getBookId() {
		return this.bookId;
	}

	public void setBookId(Integer bookId) {
		this.bookId = bookId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "roomId", nullable = false)
	public Rooms getRooms() {
		return this.rooms;
	}

	public void setRooms(Rooms rooms) {
		this.rooms = rooms;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId", nullable = false)
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "startTime", nullable = false, length = 19)
	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "endTime", nullable = false, length = 19)
	public Date getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@Column(name = "description", length = 200)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "status", nullable = false)
	public boolean isStatus() {
		return this.status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

}
